package com.sinog.front.feign.biz;

import com.sinog.core.domain.PrisonerMain;
import com.sinog.core.model.UserDTO;
import com.sinog.core.utilbean.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
import java.util.Map;

/**
 * @desc 安置帮教管理 - 人员信息补录 - 信息录入
 * @author -
 * @date 2020-01-19-10:51
 */
@FeignClient("sinog2c-biz")
public interface BaseInfoblService {

    /**
     * 安置帮教管理 - 人员信息补录 - 信息补录 - 列表
     * @param pageIndex 起始页
     * @param pageSize 止页
     * @param paramMap 查询条件
     * @return String
     */
    @RequestMapping("/azbj/inmates_bl/info/list")
    String getBlInmatesList(
            @RequestParam("pageIndex") Integer pageIndex,
            @RequestParam("pageSize") Integer pageSize,@RequestParam Map<String,Object> paramMap);

    /**
     * 根据司法所去获取户籍地
     * @param level level
     * @param departId departId
     * @return Result
     */
    @GetMapping("/azbj/inmates_bl/getHuJi")
    Result getHuJi(@RequestParam("level") String level,@RequestParam("departId") String departId);

    /**
     * 填写信息
     * @param priNum priNum
     * @return String
     */
    @GetMapping("/azbj/inmates_bl/getTuJingByPriNum")
    String findTuJing(@RequestParam("priNum") String priNum);

    /**
     * 安置帮教管理 - 人员信息补录 - 信息补录 - 删除按钮
     * @param prinum 服刑人员编号
     * @return int
     */
    @PostMapping("/azbj/inmates/baseinfo/removeInfo")
    int remeveBaseinfoByPriNum(@RequestParam(value = "prinum", required = false, defaultValue = "-1") String prinum);


    /**
     * 安置帮教管理 - 人员信息补录 - 信息补录 - 批量删除
     * @param prinumLists 服刑人员编号集合
     */
    @PostMapping("/azbj/inmates/baseinfo/removeInfos")
    void remeveBaseinfoByPriNums(@RequestParam(name = "prinumLists",required = false) List<String> prinumLists);

    /**
     * 填写信息
     * @param priNum priNum
     * @return int
     */
    @GetMapping("/azbj/inmates/baseinfo/getFxByPriNum/{priNum}")
    int getFxByPriNum(@PathVariable String priNum);

    /**
     * 查询服刑人员的数据来源，pstate
     * @param priNum priNum
     * @return PrisonerMain
     */
    @GetMapping("/azbj/inmates_bl/baseinfo/getPrisonerPstate/{priNum}")
    PrisonerMain getPrisonerPstate(@PathVariable String priNum);

    /**
     * 查询该单位全部可以保存的数据
     * @param departid departid
     * @param userDTO userDTO
     * @return Result
     */
    @RequestMapping("/azbj/inmates/baseinfo/selectMainExcels/{departid}")
    Result selectMainExcels(@RequestParam("departid") String departid,@RequestBody UserDTO userDTO);

    /**
     * 檢查主表excel緩存表是否有數據
     * @param departid departid
     * @return Result
     */
    @RequestMapping("/azbj/inmates/baseinfo/checkMainExcelImportData")
    Result checkMainExcelImportData(@RequestParam("departid") String departid);

    /**
     * 根据时间查询uuid
     * @param date date
     * @return List<Map < String,String>>
     */
    @RequestMapping("/azbj/import/search/code/selectUuidByDate")
    List<Map<String,String>> getUuidList(@RequestParam("date") String date);
}